import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86185
 * Date: 2023-05-24
 * Time: 16:00
 */
class Player{
    String name;
    Player(String name){
        this.name = name;
    }
    int show() {  //出拳方法
        int show = ( int ) (Math.random() * 10 ) %3  +1;
        return show ;
    }
}
class ComputerPlayer extends Player {


    @Override
    int show() {
        return super.show();
    }

    ComputerPlayer(String name) {
        super(name);
    }
}
class PersonPlayer extends Player {

    PersonPlayer(String name) {
        super(name);
    }

    @Override
    int show() {
        Scanner scanner = new Scanner(System.in);
        return scanner.nextInt();
    }
}
class Game {
    ComputerPlayer player1;
    PersonPlayer player2;
    public Game(ComputerPlayer o1, PersonPlayer o2) {
        player1 = o1;
        player2 = o2;
    }
    public void start() {
        int n1 = player1.show();
        int n2 = player2.show();
        if(n1 == n2) {
            System.out.println("A Draw.");
        } else if (n1 == 1 && n2 == 2 || n1 == 2 && n2 == 3|| n1 == 3 && n2 == 1) {
            System.out.println("Winner is personPlayer.");
        } else {
            System.out.println("Winner is computerPlayer.");
        }
    }

}
public class Test {
    public static void main(String[] args) {
        ComputerPlayer c = new ComputerPlayer ("computer");
        PersonPlayer  p = new PersonPlayer("player ") ;
        Game g = new Game( c ,p );
        g.start();
    }
}
